The present invention relates to a method for reading out keys of a keyboard, in particular a keyboard of an automatic teller machine, said keys being arranged according to a row and column set-up of a matrix, wherein a first scanning pattern for reading out said keys is applied to said keyboard, said method comprises a first series of steps consisting in:                randomly generating said first scanning pattern, which comprises for each of said rows and columns a first read out value to be applied onto said row respectively said column;        applying said first scanning pattern onto said rows and columns during at least a first minimum time period.        
The invention relates also to a device for reading out keyboard keys.
Such a method and such a device are known from EP-A-0 368 520. The known method is for example used in automatic teller machines or point-of-sale terminals. The keys are generally set up as rows and columns of a matrix. In order to detect a particular key being activated, the rows and columns are scanned after application of a randomly generated scanning pattern. The detection of a modification in the applied scanning pattern indicates that a key has been activated. Indeed, the activation of a key will cause a cross-link between the row and column on which the selected key is located. By randomly generating the scanning pattern it is more difficult for unauthorised users to pick up the signal of the applied scanning pattern and thus acquire information about the activated keys.
A drawback of the known method or device is that the rows and columns are sequentially scanned and that it is not possible to change the row and column sequence otherwise than among either the columns or the row sequence in itself. This limits the possibilities of masking the data input by means of the keyboard.